WriteResource
WriteResource Write data of one resource to disk
#include <Resources.h> Resource Manager
void WriteResource(rHandle );
Handle rHandle ; handle of a valid resource in the current file
The data of the specified resource handle is written to disk (if it has been
tagged as having been changed) and the resource's resChanged attribute is
cleared.
rHandle is a resource handle from the current resource file. It is a value
obtained via GetResource, GetIndResource, et. al.
Returns: none (if rHandle is not from the current resource file or if the
resource is protected, ResError returns rmvResFailed).

Notes: WriteResource is called automatically by UpdateResFile and
Remember that if a resource has been purged, these file operations will
write a 0-length resource to the file. Thus, a typical use of this function is
in a sequence that locks a resource, changes it, writes the changes, and
unlocks the resource:
HNoPurge( rHandle ); [TOKEN:12074] inhibit purging */
/*... modify the handle data... */
ChangedResource( rHandle ); /* tag as changed */
if (ResError() == noErr ) { /* always check this! */
WriteResource( rHandle ); /* record changes to disk */
}
HPurge( rHandle ); [TOKEN:12074] allow purge */
Make sure you check ResError after calling ChangedResource (or
AddResource) and before calling WriteResource.